{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "indie-charleston",
   "metadata": {},
   "source": [
    "# Improving Auto Encoders with Semi Supervised Training"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "innovative-involvement",
   "metadata": {},
   "source": [
    "Semi-supervised training refers to training with mostly unlabeled data, with a small portion of that data labeled.\n",
    "\n",
    "Most of the time semi-supervised training can help the classifier learn a better latent representation, which in turns makes the decoder's job easier, which makes the entire system better."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "developing-protection",
   "metadata": {},
   "source": [
    "## Using semi-supervised to aid AE's performance\n",
    "\n",
    "There are many ways to use classification to aid in the process of encoding. One straightforward way is to directly train a small linear classifier to classify the latent encoded by encoder. It's essentially encouraging the encoder to separate different images with different classes into different clusters, which makes decoding simpler.\n",
    "\n",
    "Another good example is **capsule network**. When training a capsule network, the magnitude of its latent vector is passed through softmax function, and used as the confidence different classes. The way of training makes capsule networks' decoders very good generators (for MNIST numbers), despite using only linear layers."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
